package com.gujia.async;

import com.gujia.util.EntityType;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by GuJia on 2017/7/6.
 */
public class EventModel {

    private EventType type;
    private int actorId;
    private  String entityType;
    private int entityId;
    private int entityOwerId;

    private Map<String,String> exts = new HashMap<String,String>();

    public EventModel(){

    }

    public EventModel(EventType type){
        this.type = type;
    }

    public EventModel setExt(String key,String value){
        exts.put(key,value);
        return this;
    }

    public String getExt(String key){

        return exts.get(key);
    }

    public EventType getType() {
        return type;
    }

    public EventModel setType(EventType type) {
        this.type = type;
        return this;
    }

    public int getActorId() {
        return actorId;
    }

    public EventModel setActorId(int actorId) {
        this.actorId = actorId;
        return this;
    }

    public String getEntityType() {
        return entityType;
    }

    public EventModel setEntityType(String entityType) {
        this.entityType = entityType;
        return this;
    }

    public int getEntityId() {
        return entityId;
    }

    public EventModel setEntityId(int entityId) {
        this.entityId = entityId;
        return this;
    }

    public int getEntityOwerId() {
        return entityOwerId;
    }

    public EventModel setEntityOwerId(int entityOwerId) {
        this.entityOwerId = entityOwerId;
        return this;
    }

    public Map<String, String> getExts() {
        return exts;
    }

    public EventModel setExts(Map<String, String> exts) {
        this.exts = exts;
        return this;
    }
}
